package com.zhl.interface7;

public class Test2 {
    public static void main(String[] args) {
        //目标:了解接口的好处
        //继承无法满足,就可以实现接口
        //需要啥调啥
        Singer singer = new A1();
        singer.sing();

        Driver driver = new A1();
        driver.drive();

    }
}

class A1 extends Student implements Driver,Singer{

    @Override
    public void drive() {

    }


    @Override
    public void sing() {

    }
}


class Student{

}

interface Driver{
    void drive();
}

interface Singer{
    void sing();
}

